﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WenSkin.Controls;
using WenSkin.WenXmlConfig;
using WenSkinTest.UserControlAll;

namespace WenSkinTest
{
    public partial class Form1 : WenSkin.Forms.WenTabControlForm
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_TabControlAdd(object sender, TabControlAddEventArgs e)
        {
            switch (e.Text)
            {
                case "DataClass":
                    e.Control = new UserControlDataClass();
                    e.NewAdd = true;
                    break;   
                case "常用":
                    e.Control = new UserControlH();
                    e.NewAdd = true;
                    break;          
                case "分页":
                    e.Control = new UserControlPaging();
                    e.NewAdd = true;
                    break;
                case "测试":
                    e.Control = new UserControlPie();
                    e.NewAdd = true;
                    break;
                case "模板控件":
                    e.Control = new UserControlTemplate();
                    break;
                case "树结构":
                    e.Control = new TreeViewControl();
                    break;
                default:
                    break;
            }

        }

        private void Form1_ConfigButtonClick(object sender, EventArgs e)
        {
            new WenSkin.WenXmlConfig.WenConfigForm().ShowDialog();
        }

        private void Form1_SkinButtonClick(object sender, EventArgs e)
        {
            this.MsgBoxInformation("修改皮肤按钮被点击");

            WenSkin.MsgBoxShow.MsgBoxAsterisk("提醒弹出窗口");
            WenSkin.MsgBoxShow.MsgBoxError("错误弹出窗口");
            WenSkin.MsgBoxShow.MsgBoxInformation("消息提醒弹出窗口");
            WenSkin.MsgBoxShow.MsgBoxWarning("警告弹出窗口");
        }
    }
}
